package com.jyy.prefabricated.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.jyy.prefabricated.enums.BaseTeamEnum;
import com.jyy.prefabricated.vo.OnlineVo;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * 学生管理
 */
@Data
public class Student implements Serializable {

    private static final long serialVersionUID = 1L;

    private Integer id;

    /**
     * 机构id
     */
    private Integer trainingOrganizationId;

    /**
     * 姓名
     */
    private String name;

    /**
     * 身份证号
     */
    private String idCard;

    /**
     * 联系电话
     */
    private String tel;

    /**
     * 邮箱
     */
    private String email;

    /**
     * 状态
     */
    private Integer status;

    //是否分配考试
    private Integer haveExam;

    /**
     * 租户编码
     */
    private String teamCode = BaseTeamEnum.BASE.getValue();

    private String channelCode;
    /**
     * 报名项目
     */
    private List<ProjectInfo> projects = new ArrayList<>();

    /**
     * 已分配或购买的课程
     */
    private List<Course> courses = new ArrayList<>();


    /**
     * 关联机构
     */
    private List<TrainingOrganization> trainingOrganizations = new ArrayList<>();


    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateTime;

    /*
     *项目id
     */
    private Integer projectId;

    /*
     * 分配状态（0未分配，1已分配）
     */
    private Integer allocationStatus;

    private Integer  examApplyStatus;


    /*
     *项目名称
     */
    private String projectName;

    /*
     *培训机构名称
     */
    private String trainingOrganizationName;

    /*
     *证件照
     */
    private String idPhoto;

    /*
     *'出生日期
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date dateBirth;

    /**
     * 线上考试记录
     */
    private List<OnlineVo> onlineList = new ArrayList<>();

    /**
     * 线下考试记录
     */
    private List<StudentAchievement> offlineList = new ArrayList<>();


    /**
     * 线上课程记录
     */
    private List<OnlineVo> onlineCourseList = new ArrayList<>();

    /**
     * 线下培训记录
     */
    private List<StudentAchievement> offlineTrainList = new ArrayList<>();


}